// Decompiled by DJ v3.9.9.91 Copyright 2005 Atanas Neshkov  Date: 4/12/2007 09:14:42
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   RMenuBar.java

package utility;

import java.awt.MenuBar;
import java.util.Locale;

// Referenced classes of package de.escape.quincunx.i18n:
//            Localizable, RMenu

public class RMenuBar extends MenuBar
    implements Localizable
{

    public RMenuBar(Locale l)
    {
        locale = l;
    }

    public void setLocale(Locale l)
    {
        locale = l;
        for(int i = getMenuCount() - 1; i >= 0; i--)
        {
            java.awt.Menu m = getMenu(i);
            if(m instanceof Localizable)
                ((Localizable)m).setLocale(l);
        }

    }

    public Locale getLocale()
    {
        return locale;
    }

    public void add(RMenu m)
    {
        if(m.getLocale() == null)
            m.setLocale(locale);
        super.add(m);
    }

    protected Locale locale;
}